<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<script type="text/javascript"
	src="<c:url value="/js/jquery-easyui-1.5.5.6/jquery.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/jquery-easyui-1.5.5.6/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/jquery-easyui-1.5.5.6/locale/easyui-lang-zh_CN.js"/>"></script>
<link rel="stylesheet" type="text/css"
	href="<c:url value="/js/jquery-easyui-1.5.5.6/themes/default/easyui.css"/>" />
<link rel="stylesheet" type="text/css"
	href="<c:url value="/js/jquery-easyui-1.5.5.6/themes/icon.css"/>" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>定义工作职责</title>
	<style type="text/css">
		 
	</style>
</head>
<body>
<script type="text/javascript">
			$(function(){
				$("#add").linkbutton({
					onClick : function() {
						$("#win").dialog("open");
					}
				});
			});
	</script>
	<div id="tbs6">
   		 <a id="add" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true,text:'添加'"></a>
    	 <a id="refresh" class="easyui-linkbutton" data-options="iconCls:'icon-reload',text:'刷新',plain:true,iconAlign:'right'"></a>
		<input class="easyui-searchbox" data-options="label:'搜索',width:300,labelWidth:50,
     	searcher:function(value,name){
	       // $('#tb').datagrid('load','userselect?username='+value);
     	 }">
  </div>
		<table id="tb" class="easyui-datagrid" data-options="
			url:'page',
			fitColumns:true,
			fit:true,
			nowrap:false,
			loading:true,
			pagination:true,
			rownumbers:true,
			singleSelect:true,
			pageSize:10,
    		pageList:[10,20,30,40,50],
			toolbar:'#tbs6',
			striped:true,
			method:'get'	
	">
		<thead>
		  <tr>
			<th data-options="field:'username',width:200,align:'center'">工作编号</th>
			<th data-options="field:'sex',width:200,align:'center',
				styler:function(value,row,index){
					if(value==1){
						return 'color:white;background:red;';
					}
				}
			">工作名称</th>
		 
		  	<th data-options="field:'2',width:200,align:'center'"></th>
		  </tr>	
		</thead>
		<tbody>
			<tr>
				<td>1</td><td>1</td>
				<td>
				<a id="add" class="easyui-linkbutton" data-options="height:30,width:30,plain:true,iconCls:'icon-cancel',align:'center'"></a>
				</td>
			</tr>
		</tbody>
	</table>
<div id="win" class="easyui-dialog"data-options="width:320, height:170,
			title:'用户注册',
     		bodyCls:'enroll',
      		modal:true,
      		closed:true,
      		buttons:[{
	        	text:'保存',
	        	iconCls:'icon-ok',
        		handler:function(){
          		 $('#f').form({
            		onSubmit:function(param){
            		 //验证表单
						var cc=$('#ids').textbox('getValue');
             		 return $(this).form('validate');
            		},
	           		 success:function(v){
	              		$.messager.alert('提示','注册成功');
	              		$('#win').dialog('close');
	            	}
          	    }).submit();
       		  }
      		},{
        	text:'取消',
        	iconCls:'icon-cancel',
        	handler:function(){
          		$('#win').dialog('close');
        	}
			}
			]">
		<form id="f" action="enroll" method="post">
			<div class="line">
				        <input id="ids" class="easyui-textbox" name=""
					data-options="label:'工作职责编码',width:250">
			</div>
			
			<div class="line">
				        <input class="easyui-textbox" name=""
					data-options="label:'工作职责名称',width:250">
			</div>
		 
		</form>
	</div>

</body>
</html>